Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix jdbc registry cannot work #15861

Merged

Conversation

ruanwenjun
Copy link
Member

@ruanwenjun ruanwenjun commented Apr 16, 2024

Purpose of the pull request

close #15854

Brief change log

  • Fix jdbc registry cannot work
  • Add jdbc registry e2e

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@@ -58,10 +70,39 @@ public class DaoConfiguration {
public DaoPluginConfiguration daoPluginConfiguration;

@Bean
public MybatisPlusInterceptor paginationInterceptor(DbType dbType) {
public SqlSessionFactory sqlSessionFactory(DbType dbType, DataSource dataSource) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this will create SqlSessionFactory for use, got it.

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 31 lines in your changes are missing coverage. Please review.

Project coverage is 39.35%. Comparing base (a8bc237) to head (fe757e0).

❗ Current head fe757e0 differs from pull request most recent head a10a2be. Consider uploading reports for the commit a10a2be to get more accurate results

Files Patch % Lines
...hinscheduler/tools/command/CommandApplication.java 0.00% 30 Missing ⚠️
...org/apache/dolphinscheduler/alert/AlertServer.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15861      +/-   ##
============================================
- Coverage     39.37%   39.35%   -0.03%     
+ Complexity     4972     4968       -4     
============================================
  Files          1347     1348       +1     
  Lines         45630    45660      +30     
  Branches       4890     4895       +5     
============================================
  Hits          17968    17968              
- Misses        25747    25777      +30     
  Partials       1915     1915              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -108,8 +108,12 @@ jobs:
case:
- name: cluster-test-mysql
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to cluster-test-mysql-with-zookeeper-registry for better differentiation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@SbloodyS SbloodyS added bug Something isn't working 3.3.0 labels Apr 17, 2024
@SbloodyS SbloodyS added this to the 3.3.0 milestone Apr 17, 2024
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_forbiddenForsuccessUnFinished branch 7 times, most recently from 0c4fbd2 to 469567c Compare April 17, 2024 05:52
@ruanwenjun ruanwenjun marked this pull request as draft April 17, 2024 07:07
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_forbiddenForsuccessUnFinished branch 8 times, most recently from 3bf6413 to 80487b7 Compare April 17, 2024 14:06
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_forbiddenForsuccessUnFinished branch 4 times, most recently from 6c52601 to cfbe7b7 Compare April 17, 2024 15:54
@ruanwenjun ruanwenjun marked this pull request as ready for review April 17, 2024 15:55
Comment on lines +45 to +47
@ComponentScan(value = "org.apache.dolphinscheduler", excludeFilters = {
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = JdbcRegistryAutoConfiguration.class)
})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since AutoConfigureAfter can only be used at AutoConfiguration which is not under the scan path, so we need to exclude this, we need to remove the ComponentScan here, we should scan the bean under alert, the bean in other package should be import manual.

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_forbiddenForsuccessUnFinished branch 2 times, most recently from 3c7f179 to 90f5a56 Compare April 18, 2024 02:55
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_forbiddenForsuccessUnFinished branch from 90f5a56 to a10a2be Compare April 18, 2024 03:32
Copy link

sonarcloud bot commented Apr 18, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
19.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarCloud

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ruanwenjun ruanwenjun merged commit 163f8f0 into apache:dev Apr 18, 2024
61 of 63 checks passed
@ruanwenjun ruanwenjun deleted the dev_wenjun_forbiddenForsuccessUnFinished branch April 18, 2024 07:43
@SbloodyS SbloodyS changed the title Fix jdbc registry cannot work [Fix] Fix jdbc registry cannot work Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [Registry] Bug when start jdbc registry
4 participants